<html>
<head><meta charset="utf-8"><title>sharding hash quality · t-compiler/wg-parallel-rustc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/index.html">t-compiler/wg-parallel-rustc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding.20hash.20quality.html">sharding hash quality</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="181839680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding%20hash%20quality/near/181839680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding.20hash.20quality.html#181839680">(Nov 25 2019 at 16:41)</a>:</h4>
<p><span class="user-mention" data-user-id="116466">@Zoxc</span> one thing I noticed this weekend is that we keep the original hash when we shard, which means that 5 bits at least of the hash are always the same within a single shard, have we checked that hashbrown is okay with that?</p>



<a name="181839719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding%20hash%20quality/near/181839719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding.20hash.20quality.html#181839719">(Nov 25 2019 at 16:41)</a>:</h4>
<p>I know I've heard historically that hash quality is super important for the hashmap performance (particularly the one we're using)</p>



<a name="181841601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding%20hash%20quality/near/181841601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding.20hash.20quality.html#181841601">(Nov 25 2019 at 17:01)</a>:</h4>
<p>I picked the bits which hashbrown uses last to use for sharding</p>



<a name="181847411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding%20hash%20quality/near/181847411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding.20hash.20quality.html#181847411">(Nov 25 2019 at 18:07)</a>:</h4>
<p>sure, but the hash is still being used for the top-level selection of which element to use, right?</p>



<a name="181847415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding%20hash%20quality/near/181847415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/187679-t-compiler/wg-parallel-rustc/topic/sharding.20hash.20quality.html#181847415">(Nov 25 2019 at 18:07)</a>:</h4>
<p>did we check that we're still getting a good distribution?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>